﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<iBuproModel.DiplomProject>>" %>
<%@ Import Namespace="IBupro.Extensions" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%: Html.Translate("diplomProjects") %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%: Html.Translate("diplomProjects") %></h2>

    <table>
    <thead>
        <tr>
            <th></th>
            <th>
                <%: Html.Translate("name") %>
            </th>
            <th>
                <%: Html.Translate("details") %>
            </th>
            <th>
                <%: Html.Translate("created") %>
            </th>
            <th>
                <%: Html.Translate("shortcut") %>
            </th>
            <!--
            <th>
                <%: Html.Translate("approved") %>
            </th>
            -->
            <th>
                <%: Html.Translate("state") %> 
            </th>
        </tr>
    </thead>

    <tbody>
    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink(Html.Translate("edit"), "Edit", new { id = item.Id })%>
                <%: Html.ActionLink(Html.Translate("details"), "Details", new { id = item.Id })%>
                <!--<%: Html.ActionLink(Html.Translate("delete"), "Delete", new { id = item.Id })%>-->
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: Html.TruncateDetail(item.Detail) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.Created) %>
            </td>
            <td>
                <%: item.Shortcut %>
            </td>
            <!--
            <td>
                <% if(item.Approved) { %>
                <%: Html.Translate("yes").ToUpper() %>
                <% } else { %> 
                <%: Html.Translate("no").ToUpper()%>
                <% } %>
            </td>
            -->
            <td>
                <%:item.DiplomProjectState.Name %>
            </td>

        </tr>
    
    <% } %>
    </tbody>
    </table>

    <p>
        <%: Html.ActionLink(Html.Translate("createNew"), "Create")%>
    </p>

</asp:Content>

